package com.keensense.vcm.model;

import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 * @author lanjian
 * @date 2020/5/7 3:33 下午
 */
@XmlRootElement(name = "response")
public class NvNResponse extends BaseResponse{


    @XmlElement
    private String taskId;

    @XmlElementWrapper(name = "faceInfos")
    @XmlElement(name = "faceInfo")
    private List<FaceInfo> faceInfos;

    @XmlTransient
    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    @XmlTransient
    public List<FaceInfo> getFaceInfos() {
        return faceInfos;
    }

    public void setFaceInfos(List<FaceInfo> faceInfos) {
        this.faceInfos = faceInfos;
    }

    /**
     * 人脸信息
     */
    public static class FaceInfo {

        @XmlElement
        private Integer frequence;

        @XmlElementWrapper(name = "recordInfos")
        @XmlElement(name = "recordInfo")
        private List<RecordInfo> recordInfos;

        @XmlElement
        private FirstSnapInfo firstSnapInfo;

        @XmlTransient
        public Integer getFrequence() {
            return frequence;
        }

        public void setFrequence(Integer frequence) {
            this.frequence = frequence;
        }

        @XmlTransient
        public List<RecordInfo> getRecordInfos() {
            return recordInfos;
        }

        public void setRecordInfos(List<RecordInfo> recordInfos) {
            this.recordInfos = recordInfos;
        }

        @XmlTransient
        public FirstSnapInfo getFirstSnapInfo() {
            return firstSnapInfo;
        }

        public void setFirstSnapInfo(FirstSnapInfo firstSnapInfo) {
            this.firstSnapInfo = firstSnapInfo;
        }
    }

    public static class RecordInfo {

        /**
         * 过脸记录Id
         */
        @XmlElement
        private String recordId;

        /**
         * 输出人脸分组信息，按照输入条件分组顺序返回，从0开始。输入的第一个条件组编号为0，第二个为1，以此类推。
         */
        @XmlElement
        private Integer faceGroupNo;

        /**
         * 摄像机sn
         */
        @XmlElement
        private String cameraSn;

        /**
         * 发生时间戳，格式为long型
         */
        @XmlElement
        private Long occurrenceTime;

        /**
         * 静态库ID
         */
        private String libraryId;

        /**
         * 静态库人员ID
         */
        private String peopleId;

        /**
         * 静态库人员图片ID
         */
        private String fileId;

        @XmlTransient
        public String getRecordId() {
            return recordId;
        }

        public void setRecordId(String recordId) {
            this.recordId = recordId;
        }

        @XmlTransient
        public Integer getFaceGroupNo() {
            return faceGroupNo;
        }

        public void setFaceGroupNo(Integer faceGroupNo) {
            this.faceGroupNo = faceGroupNo;
        }

        @XmlTransient
        public String getCameraSn() {
            return cameraSn;
        }

        public void setCameraSn(String cameraSn) {
            this.cameraSn = cameraSn;
        }

        @XmlTransient
        public Long getOccurrenceTime() {
            return occurrenceTime;
        }

        public void setOccurrenceTime(Long occurrenceTime) {
            this.occurrenceTime = occurrenceTime;
        }

        @XmlElement
        public String getLibraryId() {
            return libraryId;
        }

        public void setLibraryId(String libraryId) {
            this.libraryId = libraryId;
        }

        @XmlElement
        public String getPeopleId() {
            return peopleId;
        }

        public void setPeopleId(String peopleId) {
            this.peopleId = peopleId;
        }

        @XmlElement
        public String getFileId() {
            return fileId;
        }

        public void setFileId(String fileId) {
            this.fileId = fileId;
        }
    }

    public static class FirstSnapInfo {

        /**
         * O string 过脸记录Id
         */
        @XmlElement
        private String recordId;
        /**
         * 摄像机sn
         */
        @XmlElement
        private String cameraSn;

        /**
         * 人脸id
         */
        @XmlElement
        private String faceId;

        /**
         * 相似度（此次不实现）
         */
        @XmlElement
        private Integer similarity;

        /**
         * 摄像机地址(此次不实现)
         */
        @XmlElement
        private String cameraAddress;

        @XmlElement
        private Long occurrenceTime;
        /**
         * 人脸抓拍图URL
         */
        @XmlElement
        private String faceURL;

        @XmlTransient
        public String getRecordId() {
            return recordId;
        }

        public void setRecordId(String recordId) {
            this.recordId = recordId;
        }

        @XmlTransient
        public String getCameraSn() {
            return cameraSn;
        }

        public void setCameraSn(String cameraSn) {
            this.cameraSn = cameraSn;
        }

        @XmlTransient
        public String getFaceId() {
            return faceId;
        }

        public void setFaceId(String faceId) {
            this.faceId = faceId;
        }

        @XmlTransient
        public Integer getSimilarity() {
            return similarity;
        }

        public void setSimilarity(Integer similarity) {
            this.similarity = similarity;
        }

        @XmlTransient
        public String getCameraAddress() {
            return cameraAddress;
        }

        public void setCameraAddress(String cameraAddress) {
            this.cameraAddress = cameraAddress;
        }

        @XmlTransient
        public Long getOccurrenceTime() {
            return occurrenceTime;
        }

        public void setOccurrenceTime(Long occurrenceTime) {
            this.occurrenceTime = occurrenceTime;
        }

        @XmlTransient
        public String getFaceURL() {
            return faceURL;
        }

        public void setFaceURL(String faceURL) {
            this.faceURL = faceURL;
        }
    }
}
